package com.tsingtree.modular.enums;

import lombok.Getter;

import java.util.Map;
import java.util.TreeMap;

@Getter
public enum NoticeTypeEnum {

    ANNOUNCE(0, "公告"),
    AGREEMENT(1, "协议"),
    ;

    private final int key;

    private final String desc;

    NoticeTypeEnum(int key) {
        this.key = key;
        this.desc = "";
    }

    NoticeTypeEnum(int key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static Map<Integer, String> getAll() {
        Map<Integer, String> map = new TreeMap<>();
        for (NoticeTypeEnum loanInterestEnum : NoticeTypeEnum.values()) {
            map.put(loanInterestEnum.getKey(), loanInterestEnum.getDesc());
        }
        return map;
    }

}
